[Backport 2.x] Filter shards for sliced search at coordinator#17025
Merged
[Backport 2.x] Filter shards for sliced search at coordinator#17025
Conversation
* Filter shards for sliced search at coordinator Prior to this commit, a sliced search would fan out to every shard, then apply a MatchNoDocsQuery filter on shards that don't correspond to the current slice. This still creates a (useless) search context on each shard for every slice, though. For a long-running sliced scroll, this can quickly exhaust the number of available scroll contexts. This change avoids fanning out to all the shards by checking at the coordinator if a shard is matched by the current slice. This should reduce the number of open scroll contexts to max(numShards, numSlices) instead of numShards * numSlices. --------- Signed-off-by: Michael Froh <froh@amazon.com> (cherry picked from commit f9c239d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Contributor
|
❌ Gradle check result for 32f689e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
reta
reviewed
Jan 15, 2025
server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java
Outdated
Show resolved
Hide resolved
reta
reviewed
Jan 15, 2025
server/src/main/java/org/opensearch/action/admin/cluster/shards/ClusterSearchShardsRequest.java
Outdated
Show resolved
Hide resolved
reta
reviewed
Jan 15, 2025
server/src/main/java/org/opensearch/cluster/routing/OperationRouting.java
Show resolved
Hide resolved
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
c7ada28 to
72ed864
Compare
reta
approved these changes
Jan 15, 2025
Contributor
|
❌ Gradle check result for 72ed864: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Contributor
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #17025 +/- ##
============================================
+ Coverage 71.83% 71.96% +0.12%
- Complexity 65588 65683 +95
============================================
Files 5318 5318
Lines 305779 305807 +28
Branches 44583 44596 +13
============================================
+ Hits 219653 220061 +408
+ Misses 67817 67388 -429
- Partials 18309 18358 +49 ☔ View full report in Codecov by Sentry. |
This was referenced Jan 15, 2025
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport f9c239d from #16771.